(function() {

    var
    $u = juliet.using({
        validationResult : 'juliet.validation.validationResult-0.2',
        Base : 'juliet.validation.validators.Base-0.2'
    }),
    vr = $u('validationResult');

    var NotEmptyClass = function() {

        this.defaultErrorKey = 'validation:not-empty';

        this.validate = function(value) {
            var cache = this.validationCache;

            if (cache.value === value) {
                return;
            }

            cache.value = value;
            cache.result = (value && (value.length > 0)) ? vr.SUCCESS : vr.FAILED;
        };

    };

    NotEmptyClass.prototype = new ($u('Base'))();

    juliet.registerModule('juliet.validation.validators', 'NotEmpty-0.2', NotEmptyClass);

})();
